/**
 * Project Name:sq580_ow;<br/>
 * File Name:UserServiceImpl;<br/>
 * Package Name:com.sq580.ow.service.impl;<br/>
 * Date: 2018-06-22 14:54;<br/>
 * Copyright (c) 2018, www.sq580.com All Rights Reserved.;<br/>
 */
package com.sq580.ow.service.impl;

import com.sq580.ow.bean.User;
import com.sq580.ow.dao.UserDao;
import com.sq580.ow.mapper.UserMapper;
import com.sq580.ow.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * ClassName: UserServiceImpl<br/>
 * Function: TODO ADD FUNCTION(可选)<br/>
 * Reason: TODO ADD REASON(可选)<br/>
 * Date: 2018-06-22 14:54<br/>
 *
 * @author xiawei
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userDao;
    //@Autowired
    //private UserDao userDao;

    @Override
    public User getUserById(Integer id) {
        return userDao.getUserById(id);
    }

    @Override
    public List<User> getUserList() {
        return userDao.getUserList();
    }

    @Override
    public int add(User user) {
        return userDao.add(user);
    }

    @Override
    public int update(Integer id, User user) {
        return userDao.update(id,user);
    }

    @Override
    public int delete(Integer id) {
        return userDao.delete(id);
    }
}